package io.lkt.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.lkt.common.util.Query;
import io.lkt.modules.sys.entity.BBrandInfoEntity;
import io.lkt.modules.sys.entity.BUserBrandInfoEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户品牌信息表
 *
 * @author xss
 * @email dustwas@163.com
 * @date 2019-03-11 14:40:57
 */
public interface BUserBrandInfoService extends IService<BUserBrandInfoEntity>{

    List<BUserBrandInfoEntity> queryList(Map<String, Object> map);

    Integer queryTotal(Map<String, Object> map);

    Integer vipTotal(Integer brand_id);

    Map<String,Object> articleTotal(Integer brand_id);

    Integer tencentTotal(Integer brand_id);

    List<BUserBrandInfoEntity> queryUser(Map<String, Object> map);

    Integer queryUserTotal(Map<String, Object> map);

    Integer mergeBrand(BUserBrandInfoEntity bUserBrandInfoEntity);

    Integer delUserBrand(Integer brandId);

    /**
     * 保存用户订阅的品牌
     * @param userId
     * @param brandName
     * @return
     */
    int storeUserSubBrand(Integer userId, String brandName);

    Integer getUserBrandCount(Integer userId);

    List<BUserBrandInfoEntity> getUserBrand(Map<String, Object> map);

    BUserBrandInfoEntity getSimplyInfoById(Integer id);

    int updateUserBrandPoster(Integer id, String brandPoster);

    /**
     * 获取用户最新的品牌信息
     * @param userId
     * @return
     */
    BBrandInfoEntity getUserLatestBrandInfo(Integer userId);
}

